import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import "./assets/css/global.css"
// 导入所有的el-icon图标
import * as ElIconModules from '@element-plus/icons'


router.beforeEach((to,from,next)=>{
    if(to.meta.title){
        /*由路由发生变化修改页面title*/
        document.title = to.meta.title
    }
    next()
})

createApp(App).use(ElementPlus,{size:'small',locale: zhCn},).use(store).use(router).mount('#app')